<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box div {
            width: 100px;
            height: 100px;
            background: red;
        }

        .box div:first-child {
            float: left;
        }

        .box div:last-child {
            float: right;
        }

        /* 浮动之后会脱离文档流，会导致父元素没有高度 */
    </style>
</head>

<body>
    <!-- 浮动 -->
    <!-- 
        float : left right
     -->
    <div class="box">
        <div>left</div>
        <div>right</div>
    </div>
    111111
</body>

</html>